package site.timers.chat.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Classname UserEnum
 * @Description TODO
 * @Version 1.0.0
 * @Date 2025/8/14 13:38
 * @Author twl
 */
@Getter
@AllArgsConstructor
public enum UserEnum {

    OPTIMUS_PRIME("001", "123456", "擎天柱", "b8695ba9ac024a66b534f233a5b620f8"),

    MEGATRON("002", "123456", "威震天", "784fe893aa9a42f29803d9c967949530"),

    ;

    private final String account;

    private final String password;

    private final String nickName;

    private final String token;

    public static UserEnum getByAccountAndPassword(String account, String password) {
        for (UserEnum value : values()) {
            if (value.account.equals(account) && value.password.equals(password)) {
                return value;
            }
        }
        return null;
    }
}
